<template>
	<div class="admin-message-index">
		<div class="task-search">
			<div class="task-search_martio">
				<div class="task-search_text">消息</div>
				<div class="task-search_box">
					<i class="el-icon-search"></i>
					<el-input placeholder="请输入搜索内容" v-model="selectInput" @input="selectClick"></el-input>
				</div>
			</div>
		</div>
		<div class="admin-message-index-flex" v-if="viewModel!==null">
			<div class="admin-message-index-list" v-for="(item, index) in viewModel.messages" :key="index" @click="linkTo(item)" :title="item.name">
				<div class="admin-message-index-icon">
					<x-icon :xClass="item.icon" color="#fff" size="34"></x-icon>
				</div>
				<div class="admin-message-index-cont">
					<div class="admin-message-index-title">{{item.name}}</div>
					<div class="admin-message-index-intro">
						{{item.intro}}
					</div>
				</div>
			</div>
		</div>
		<zk-nodata v-else></zk-nodata>
	</div>
</template>

<script>
	import ala from 'ala'
	export default {
		data() {
			return {
				viewModel: null,
				selectInput: '',
				selectModel: {}
			}
		},
		props: {
			widget: {}
		},
		mounted() {
			this.init()
		},
		methods: {
			async init() {
				this.viewModel = await this.$api.imMessageModules()
			},
			linkTo(val) {},
			selectClick() {

			}
		}
	}
</script>
<style lang="scss">
	@import "./var.scss";
</style>